'use strict';

require(['jquery', 'sui', 'sui-extend'], function ($) {
    $('#app').addClass('open');
});
require(['jquery'], function ($) {
    (function () {
        $('.stat-words').each(function (index, item) {
            var _this = this;
            var max_words = $(this).attr('data-max-words');
            var textarea = $(this).attr('data-listener-textarea');
            var set_words = function set_words(length) {
                $(_this).html(length + ' / ' + max_words);
            };

            $(textarea).on('input', function () {
                set_words(this.value.length);
            });
        });
    })();
});

require(['jquery'], function ($) {
    var users = [];
    $('#create_actions').on('click', function () {
        if (users.length == 0) {}
        var callback = function () {

            return function () {
                console.log('choose one');
            };
        }();
        $.actions([[{
            text: '五棵树中学',
            onClick: callback
        }, {
            text: '六棵树中学',
            onClick: callback
        }], [{
            text: '取消',
            color: 'danger'
        }]]);
    });
});
